package com.takeshequ.friends;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.takeshequ.R;

public class ContentItem2 implements ListItems {

	private int resId;
	private String text;
	private String tag;

	public int getResId() {
		return resId;
	}

	public void setResId(int resId) {
		this.resId = resId;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getTag() {
		return tag;
	}

	public void setTag(String tag) {
		this.tag = tag;
	}

	@Override
	public int getLayout() {
		return R.layout.friends_content_layout2;
	}

	@Override
	public boolean isClickable() {
		return true;
	}

	@Override
	public View getView(Context context, View convertView,
			LayoutInflater inflater) {
		convertView = inflater.inflate(getLayout(), null);
		ImageView iv = (ImageView) convertView
				.findViewById(R.id.add_friend_img);
		iv.setImageDrawable(context.getResources().getDrawable(this.resId));
//		iv.setBackgroundDrawable(context.getResources().getDrawable(this.resId));
		TextView tv = (TextView) convertView.findViewById(R.id.add_friend_text);
		tv.setText(this.text);
		convertView.setTag(this.tag);
		return convertView;
	}
}
